const map = {
  "//localhost:8080/": 'http://',
  // "//localhost:8080/": process.env.VUE_APP_CORE_URL, // core 应用
  // "//localhost:8081/": process.env.VUE_APP_RESPONSE_URL, // response 应用
  // "//localhost:18883/rag-web-gray/": process.env.VUE_APP_DIFY_URL, // dify 应用
};

export default function hostMap(host) {
  if (process.env.NODE_ENV === "dev") {
    return host;
  }

  const currentHost = window.location.origin;
  return `${currentHost}${map[host]}`;
}